<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox-content">
					<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${us.id}"
							type="hidden">
						<div class="form-group">
							<label class="col-sm-3 control-label">商品选择：</label>
							<div class="col-sm-8">
							     <input id="svipId" name="svipId" th:value="${us.svipId}"type="hidden">
								<select id="selectTest" name="selectTest" onchange="gradeChange()">
										<option th:each="dict : ${svip}" th:value="${dict.id}" th:text="${dict.title}">
									</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">加价金额：</label>
							<div class="col-sm-8">
								<input id="stock" name="stock" th:value="${us.stock}" class="form-control"
									type="text"  >
							</div>
							
						</div>
						<div class="text-right form-group">
								<a class="btn btn-default waves-effect waves-light"
									onclick="returnList()">返回列表</a>
								<button type="button"
									class="btn btn-primary waves-effect waves-light"
									onclick="save()">保存</button>
							</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
	<script>
$(function () {
	var svipId=$('#svipId').val();
	$("#selectTest option[value= "+svipId+"]").attr("selected", "selected");
});

function gradeChange() {
	 var svipId = $("#selectTest").val();
	 $("#svipId").val(svipId);
}
</script>
	<script type="text/javascript" src="/js/appjs/product/add.js">
	</script>
</body>
</html>
